package org.benjamin.tenancy.domain.entity;

import java.math.BigDecimal;
import java.security.Timestamp;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table;

/**
 * 水电记录
 * @author 黄文杰
 *
 */
@Entity
@Table(name = "tab_hydroelectricity_log")
public class HydroelectricityLog {
	
	@Id
	private Integer id;
	
	@ManyToOne
	@JoinColumn(name = "housing_id")
	private Housing housing;
	
	@Column(name = "water_meter")
	private BigDecimal waterMeter;
	
	@Column(name = "electrical_meter")
	private BigDecimal electricalMeter;
	
	@Column(name = "year")
	private Integer year;
	
	@Column(name = "month")
	private Integer month;
	
	@OrderBy
	@Column(name = "entering_date")
	private Date enteringDate;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Housing getHousing() {
		return housing;
	}

	public void setHousing(Housing housing) {
		this.housing = housing;
	}

	public BigDecimal getWaterMeter() {
		return waterMeter;
	}

	public void setWaterMeter(BigDecimal waterMeter) {
		this.waterMeter = waterMeter;
	}

	public BigDecimal getElectricalMeter() {
		return electricalMeter;
	}

	public void setElectricalMeter(BigDecimal electricalMeter) {
		this.electricalMeter = electricalMeter;
	}

	public Date getEnteringDate() {
		return enteringDate;
	}

	public void setEnteringDate(Date enteringDate) {
		this.enteringDate = enteringDate;
	}

}
